package com.vdong.task.job.service.jobhandler;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vdong.trade.order.facade.OrderFacade;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

/**
 * 15分钟不付款 取消订单定时任务
 *
 * @author zhoulongbiao
 * @Date 2019/1/3 16:52
 */
@JobHandler(value = "autoCanelOrderHandler")
@Component
public class AutoCanelOrderHandler extends IJobHandler {

    @Reference
    private OrderFacade orderFacade;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("autoCanelOrder-job-start============");
        String s = orderFacade.autoCanelOrder();
        XxlJobLogger.log("autoCanelOrder-job-end============");
        return SUCCESS;
    }
}
